Skip to content

perf(tui): open the launcher without blocking on network - #13

Merged
duyet merged 1 commit into
mainfrom
fix/faster-launcher
Aug 24, 2026
Merged

perf(tui): open the launcher without blocking on network#13
duyet merged 1 commit into
mainfrom
fix/faster-launcher

Conversation

@duyet

@duyet duyet commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • First launcher frame is local only (config + PATH). /v1/me runs in a background thread and patches the header.
  • Agent detection walks PATH in-process (cached) instead of spawning which/where six times.
  • Fullscreen probe no longer calls enable_raw_mode() before the first draw.

Test plan

  • cargo test
  • anyr opens immediately; credits appear a moment later

Paint the palette first. Credits and identity load on a background thread
and fill the header when ready. PATH is walked in-process instead of
spawning which/where for every agent. Fullscreen detection no longer
enters raw mode as a probe.

Co-Authored-By: duyetbot <bot@duyet.net>

Co-authored-by: Duyet Le <me@duyet.net>
Co-authored-by: duyetbot <bot@duyet.net>
@github-actions

Copy link
Copy Markdown
Contributor

anyr size and startup

Startup is wall time for a cold anyr --version / anyr --help (median of 21 runs). Size is the stripped release binary, or the .wasm for the browser demo.

Size budget: anyr-linux-x86_64 must stay ≤ 4.0 MiB (4194304 bytes) stripped.

Asset Kind Size --version median --help median
anyr-darwin-arm64 native 2.4 MiB 3.11 ms 3.02 ms
anyr-linux-arm64 native 2.3 MiB 0.76 ms 0.78 ms
anyr-linux-x86_64 native 2.6 MiB 1.02 ms 1.03 ms
anyr-windows-x86_64.exe native 2.2 MiB 8.75 ms 8.97 ms
anyr.wasm wasm 173.9 KiB

Budget check: ok

raw timings
[
  {
    "asset": "anyr-darwin-arm64",
    "kind": "native",
    "path": "/Users/runner/work/cli/cli/anyr-darwin-arm64",
    "bytes": 2480296,
    "size": "2.4 MiB",
    "version": "0.1.10 (built 2026-08-24 12:13:46)",
    "target": "aarch64-apple-darwin",
    "os": "macos-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 2.66,
      "median_ms": 3.11,
      "p95_ms": 4.94,
      "mean_ms": 3.45
    },
    "startup_help": {
      "n": 21,
      "min_ms": 2.4,
      "median_ms": 3.02,
      "p95_ms": 3.93,
      "mean_ms": 3.12
    }
  },
  {
    "asset": "anyr-linux-arm64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-arm64",
    "bytes": 2429944,
    "size": "2.3 MiB",
    "version": "0.1.10 (built 2026-08-24 12:13:23)",
    "target": "aarch64-unknown-linux-gnu",
    "os": "ubuntu-24.04-arm",
    "startup_version": {
      "n": 21,
      "min_ms": 0.73,
      "median_ms": 0.76,
      "p95_ms": 0.85,
      "mean_ms": 0.77
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.72,
      "median_ms": 0.78,
      "p95_ms": 0.82,
      "mean_ms": 0.78
    }
  },
  {
    "asset": "anyr-linux-x86_64",
    "kind": "native",
    "path": "/home/runner/work/cli/cli/anyr-linux-x86_64",
    "bytes": 2740576,
    "size": "2.6 MiB",
    "version": "0.1.10 (built 2026-08-24 12:13:33)",
    "target": "x86_64-unknown-linux-gnu",
    "os": "ubuntu-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 0.99,
      "median_ms": 1.02,
      "p95_ms": 1.08,
      "mean_ms": 1.02
    },
    "startup_help": {
      "n": 21,
      "min_ms": 0.99,
      "median_ms": 1.03,
      "p95_ms": 1.14,
      "mean_ms": 1.07
    }
  },
  {
    "asset": "anyr-windows-x86_64.exe",
    "kind": "native",
    "path": "D:\\a\\cli\\cli\\anyr-windows-x86_64.exe",
    "bytes": 2264576,
    "size": "2.2 MiB",
    "version": "0.1.10 (built 2026-08-24T12:14:35Z)",
    "target": "x86_64-pc-windows-msvc",
    "os": "windows-latest",
    "startup_version": {
      "n": 21,
      "min_ms": 8.35,
      "median_ms": 8.75,
      "p95_ms": 8.97,
      "mean_ms": 8.75
    },
    "startup_help": {
      "n": 21,
      "min_ms": 8.75,
      "median_ms": 8.97,
      "p95_ms": 9.43,
      "mean_ms": 9.03
    }
  },
  {
    "asset": "anyr.wasm",
    "kind": "wasm",
    "path": "/home/runner/work/cli/cli/target/wasm-pkg/anyr_cli_bg.wasm",
    "bytes": 178037,
    "size": "173.9 KiB",
    "version": "wasm",
    "target": "wasm32-unknown-unknown",
    "os": ""
  }
]

@duyet
duyet merged commit 58fdb8b into main Aug 24, 2026
8 checks passed
@duyet
duyet deleted the fix/faster-launcher branch August 24, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant